package ec.atreasure.com.core.utils.timer;

import java.util.TimerTask;

/**
 * Description :定时器
 * Created by wangjin on 2019/6/25.
 * Job number：
 * Phone ：18301070822
 * Email： 120182051@qq.com
 * Person in charge : 汪渝栋
 * Leader：
 */
public class BaseTimerTask extends TimerTask {
    private ITimerListener iTimerListener;

    public BaseTimerTask(ITimerListener iTimerListener) {
        this.iTimerListener = iTimerListener;
    }

    @Override
    public void run() {
        if (iTimerListener != null) {
            iTimerListener.onTimer();
        }
    }
}
